<template>
  <div class="overview-container">
    <div class="overview-header">
      <h1>Overview</h1>
      <p>Welcome to the system dashboard</p>
    </div>
    
    <div class="overview-content">
      <el-row :gutter="20">
        <el-col :span="6">
          <el-card class="overview-card">
            <div class="card-content">
              <div class="card-icon">
                <el-icon><Monitor /></el-icon>
              </div>
              <div class="card-info">
                <h3>Total Devices</h3>
                <p class="number">1,234</p>
              </div>
            </div>
          </el-card>
        </el-col>
        
        <el-col :span="6">
          <el-card class="overview-card">
            <div class="card-content">
              <div class="card-icon warning">
                <el-icon><Warning /></el-icon>
              </div>
              <div class="card-info">
                <h3>Active Alerts</h3>
                <p class="number">5</p>
              </div>
            </div>
          </el-card>
        </el-col>
        
        <el-col :span="6">
          <el-card class="overview-card">
            <div class="card-content">
              <div class="card-icon success">
                <el-icon><Check /></el-icon>
              </div>
              <div class="card-info">
                <h3>Online Devices</h3>
                <p class="number">1,200</p>
              </div>
            </div>
          </el-card>
        </el-col>
        
        <el-col :span="6">
          <el-card class="overview-card">
            <div class="card-content">
              <div class="card-icon error">
                <el-icon><Close /></el-icon>
              </div>
              <div class="card-info">
                <h3>Offline Devices</h3>
                <p class="number">34</p>
              </div>
            </div>
          </el-card>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script setup lang="ts">
import { Monitor, Warning, Check, Close } from '@element-plus/icons-vue'
</script>

<style lang="scss" scoped>
.overview-container {
  padding: 20px;
  
  .overview-header {
    margin-bottom: 30px;
    
    h1 {
      font-size: 28px;
      font-weight: 600;
      color: #303133;
      margin: 0 0 8px 0;
    }
    
    p {
      color: #909399;
      margin: 0;
    }
  }
  
  .overview-content {
    .overview-card {
      .card-content {
        display: flex;
        align-items: center;
        padding: 10px;
        
        .card-icon {
          width: 60px;
          height: 60px;
          border-radius: 12px;
          background: #409eff;
          display: flex;
          align-items: center;
          justify-content: center;
          margin-right: 15px;
          
          .el-icon {
            font-size: 24px;
            color: white;
          }
          
          &.warning {
            background: #e6a23c;
          }
          
          &.success {
            background: #67c23a;
          }
          
          &.error {
            background: #f56c6c;
          }
        }
        
        .card-info {
          h3 {
            font-size: 14px;
            color: #909399;
            margin: 0 0 8px 0;
            font-weight: normal;
          }
          
          .number {
            font-size: 24px;
            font-weight: 600;
            color: #303133;
            margin: 0;
          }
        }
      }
    }
  }
}
</style>
